﻿using System;
using visinia.SmartEngine;
using viWiki.Controllers;

public partial class Admin_Pages_viWiki_Namespaces_ManageNamespaces : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void GridViewNamespaces_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Delete")
        {
            int id = Convert.ToInt32(e.CommandArgument);            
            NamespaceController.DeleteNamespace(id);            
            Response.Redirect(Request.RawUrl);
        }
        if (e.CommandName == "Edit")
        {
            string NamespaceInfoId = (string)e.CommandArgument;            
            Response.Redirect(SystemMenu.CallPage("viWiki", "EditNamespace", "NamespaceInfoId", NamespaceInfoId));
        }
    }
    protected void NEW_PAGE_Click(object sender, EventArgs e)
    {
        Response.Redirect(SystemMenu.CallPage("viWiki", "EditNamespace"));
    }
}
